package com.leave.service;

import java.util.HashMap;
import java.util.List;

import com.leave.entity.Leave;
import com.leave.entity.User;

public interface IUserService {
	/**
	 * 根据用户名获取用户实例
	 */
	User getUserByLoginName(String loginName);
	
	/**
	 * 分页查询用户
	 * @param page
	 * @param rows
	 * @return
	 */
	HashMap<String,Object> getAllUserByPage(Integer page,Integer rows);
	
	/**
	 * 分页查询用户及其职位
	 * @param page
	 * @param rows
	 * @return
	 */
	HashMap<String,Object> getAllUserAndHasRoleByPage(Integer page,Integer rows);
	
	int removeUserByArrId(int[] arrId);

	int addUser(User u);

	int updateUserByUser(User u);
	
	int deleteRoleOfUser(int userId);
	
	int addRoleOfUser(int userId,int[] roleId);

	List<User> getUserListByRole(String string);
	
	User getUserNameByLeave(Leave leave);

	User getUserById(String userId);
	
	
}
